﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RMS.Model
{
    public class Discipline
    {
        private int _disciplineId;
        private string _disciplineName;
        private int _semester;
        private string _description;

        public Discipline(int id, string name, int semester, string description = "...")
        {
            this._disciplineId = id;
            this._disciplineName = name;
            this._semester = semester;
            this._description = description;
        }

        public override bool Equals(object obj)
        {
            Discipline discipline = obj as Discipline;
            if (discipline != null)
                return this._disciplineId == discipline.Id;
            return false;
        }

        public override int GetHashCode()
        {
            return base.GetHashCode();
        }

        public int Id
        {
            get { return this._disciplineId; }
            set { this._disciplineId = value; }
        }
        public string Name
        {
            get { return this._disciplineName; }
            set { this._disciplineName = value; }
        }
        public int Semester
        {
            get { return this._semester; }
            set { this._semester = value; }
        }
        public string Description
        {
            get { return this._description; }
            set { this._description = value; }
        }
    }
}
